package jogs.core;

import java.util.ArrayList;

public class TurnSelector 
{
  private ArrayList<Integer> idList;
  private int turnIndex = 0; 
  
  public TurnSelector()
  {
    idList = new ArrayList<Integer>(); 
  }
  
  public void addId(int id)
  {
    idList.add(id); 
  }
  
  public int nextPlayer() 
  {
    turnIndex = (turnIndex + 1) % idList.size();
    return idList.get(turnIndex); 
  }
}
